﻿using UnityEngine;
using System.Collections;

/// <summary>
/// This is a script for forcing the player back down if he tries to go 
/// up past the ceiling.
/// </summary>
public class CeilingScript : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnTriggerEnter2D(Collider2D other) {
		if (other.tag == "Player") {
			other.rigidbody2D.AddForce(new Vector2(0f,-500f));
		}
	}
}
